package com.dhcc.core.modules.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.plugins.Page;
import com.dhcc.core.framework.base.service.impl.BaseServiceImpl;
import com.dhcc.core.framework.result.node.ZTreeNode;
import com.dhcc.core.modules.system.dao.ConfigCategoryMapper;
import com.dhcc.core.modules.system.entity.ConfigCategory;
import com.dhcc.core.modules.system.service.IConfigCategoryService;

/**
 * 参数分类表数据服务层接口
 * 
 * @ClassName: ConfigCategoryServiceImpl
 * @Description: TODO
 * @author cyf
 * @date 2018-11-26 19:28:37
 */
@Service("configCategoryService")
public class ConfigCategoryServiceImpl extends BaseServiceImpl<ConfigCategoryMapper, ConfigCategory> implements IConfigCategoryService {

	@Override
	public List<ConfigCategory> page(Page<ConfigCategory> page, Map<String, Object> map) {
		return this.baseMapper.page(page, map);
	}
	@Override
	public List<ConfigCategory> list(Map<String, Object> map) {
		return this.baseMapper.list(map);
	}
	
    @Override
    public List<ZTreeNode> tree() {
        List<ZTreeNode> tree = this.baseMapper.tree();
        tree.add(ZTreeNode.createRoot());
        return tree;
    }

}